INSERT INTO user_roles (user_id, role_id)
SELECT 1, 1
WHERE NOT EXISTS (
    SELECT 1
    FROM user_roles
    WHERE user_id = 1 AND role_id = 1
);